﻿using UnityEngine;

public class AgentSpawner : MonoBehaviour
{
    public GameObject agentPrefab;
    public int spawnCount = 50;
    public float spawnRadius = 10f;
    
    private void Start()
    {
        for (int i = 0; i < spawnCount; i++)
        {
            Vector3 spawnPos = transform.position + Random.insideUnitSphere * spawnRadius;
            spawnPos.y = 0;
            
            Instantiate(agentPrefab, spawnPos, Quaternion.identity);
        }
    }
}